package com.hb.core.pojo.portal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.parent.MPCommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 门户新闻
 * @author ljs
 * @date 2022-2-10 13:50:03
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("portal_news")
@ApiModel(value="PortalNews", description="新闻表")
public class PortalNews extends MPCommonEntity {
    @ApiModelProperty(value = "新闻标题")
    private String title;

    @ApiModelProperty(value = "新闻正文")
    private String noticeContent;

    @ApiModelProperty(value = "新闻类型（1：综合新闻: 2：行业动态）")
    private Integer noticeType;

    @ApiModelProperty(value = "访问次数")
    private Integer clickCount;

    @ApiModelProperty(value = "是否置顶(1: 是 2: 否)")
    private Integer top;

    @ApiModelProperty(value = "状态(1: 正常 2:过期)")
    private Integer status;

    @ApiModelProperty(value = "封面")
    private Attachments cover;

    @ApiModelProperty(value = "发布时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishTime;

}
